{
 "cells": [
  {
   "cell_type": "code",
   "execution_count": 41,
   "metadata": {},
   "outputs": [],
   "source": [
    "import pandas as pd \n",
    "pd.set_option('max_columns', 100)\n",
    "import numpy as np \n",
    "import matplotlib.pyplot as plt \n",
    "import seaborn as sns "
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 42,
   "metadata": {},
   "outputs": [],
   "source": [
    "train = pd.read_csv('happiness_train_abbr.csv')\n",
    "test = pd.read_csv('happiness_test_abbr.csv')\n",
    "IDtest = test['id']"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "### 合并训练集和测试机"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 60,
   "metadata": {},
   "outputs": [],
   "source": [
    "train = train[train.happiness != -8]"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 61,
   "metadata": {},
   "outputs": [
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "C:\\Users\\Voyager\\Anaconda3\\lib\\site-packages\\ipykernel_launcher.py:2: FutureWarning: Sorting because non-concatenation axis is not aligned. A future version\n",
      "of pandas will change to not sort by default.\n",
      "\n",
      "To accept the future behavior, pass 'sort=True'.\n",
      "\n",
      "To retain the current behavior and silence the warning, pass sort=False\n",
      "\n",
      "  \n"
     ]
    },
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>birth</th>\n",
       "      <th>car</th>\n",
       "      <th>city</th>\n",
       "      <th>class</th>\n",
       "      <th>county</th>\n",
       "      <th>depression</th>\n",
       "      <th>edu</th>\n",
       "      <th>equity</th>\n",
       "      <th>family_income</th>\n",
       "      <th>family_m</th>\n",
       "      <th>family_status</th>\n",
       "      <th>floor_area</th>\n",
       "      <th>gender</th>\n",
       "      <th>happiness</th>\n",
       "      <th>health</th>\n",
       "      <th>health_problem</th>\n",
       "      <th>height_cm</th>\n",
       "      <th>house</th>\n",
       "      <th>hukou</th>\n",
       "      <th>id</th>\n",
       "      <th>inc_ability</th>\n",
       "      <th>income</th>\n",
       "      <th>learn</th>\n",
       "      <th>marital</th>\n",
       "      <th>nationality</th>\n",
       "      <th>political</th>\n",
       "      <th>province</th>\n",
       "      <th>relax</th>\n",
       "      <th>religion</th>\n",
       "      <th>religion_freq</th>\n",
       "      <th>socialize</th>\n",
       "      <th>status_3_before</th>\n",
       "      <th>status_peer</th>\n",
       "      <th>survey_time</th>\n",
       "      <th>survey_type</th>\n",
       "      <th>view</th>\n",
       "      <th>weight_jin</th>\n",
       "      <th>work_exper</th>\n",
       "      <th>work_manage</th>\n",
       "      <th>work_status</th>\n",
       "      <th>work_type</th>\n",
       "      <th>work_yr</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>1959</td>\n",
       "      <td>2</td>\n",
       "      <td>32</td>\n",
       "      <td>3</td>\n",
       "      <td>59</td>\n",
       "      <td>5</td>\n",
       "      <td>11</td>\n",
       "      <td>3</td>\n",
       "      <td>60000.0</td>\n",
       "      <td>2</td>\n",
       "      <td>2</td>\n",
       "      <td>45.0</td>\n",
       "      <td>1</td>\n",
       "      <td>4.0</td>\n",
       "      <td>3</td>\n",
       "      <td>2</td>\n",
       "      <td>176</td>\n",
       "      <td>1</td>\n",
       "      <td>5</td>\n",
       "      <td>1</td>\n",
       "      <td>3</td>\n",
       "      <td>20000</td>\n",
       "      <td>3</td>\n",
       "      <td>3</td>\n",
       "      <td>1</td>\n",
       "      <td>1</td>\n",
       "      <td>12</td>\n",
       "      <td>4</td>\n",
       "      <td>1</td>\n",
       "      <td>1</td>\n",
       "      <td>2</td>\n",
       "      <td>2</td>\n",
       "      <td>3</td>\n",
       "      <td>2015/8/4 14:18</td>\n",
       "      <td>1</td>\n",
       "      <td>4</td>\n",
       "      <td>155</td>\n",
       "      <td>1</td>\n",
       "      <td>2.0</td>\n",
       "      <td>3.0</td>\n",
       "      <td>1.0</td>\n",
       "      <td>30.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>1992</td>\n",
       "      <td>2</td>\n",
       "      <td>52</td>\n",
       "      <td>6</td>\n",
       "      <td>85</td>\n",
       "      <td>3</td>\n",
       "      <td>12</td>\n",
       "      <td>3</td>\n",
       "      <td>40000.0</td>\n",
       "      <td>3</td>\n",
       "      <td>4</td>\n",
       "      <td>110.0</td>\n",
       "      <td>1</td>\n",
       "      <td>4.0</td>\n",
       "      <td>5</td>\n",
       "      <td>4</td>\n",
       "      <td>170</td>\n",
       "      <td>1</td>\n",
       "      <td>1</td>\n",
       "      <td>2</td>\n",
       "      <td>2</td>\n",
       "      <td>20000</td>\n",
       "      <td>3</td>\n",
       "      <td>1</td>\n",
       "      <td>1</td>\n",
       "      <td>1</td>\n",
       "      <td>18</td>\n",
       "      <td>4</td>\n",
       "      <td>1</td>\n",
       "      <td>1</td>\n",
       "      <td>2</td>\n",
       "      <td>1</td>\n",
       "      <td>1</td>\n",
       "      <td>2015/7/21 15:04</td>\n",
       "      <td>2</td>\n",
       "      <td>4</td>\n",
       "      <td>110</td>\n",
       "      <td>1</td>\n",
       "      <td>3.0</td>\n",
       "      <td>3.0</td>\n",
       "      <td>1.0</td>\n",
       "      <td>2.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>1967</td>\n",
       "      <td>2</td>\n",
       "      <td>83</td>\n",
       "      <td>5</td>\n",
       "      <td>126</td>\n",
       "      <td>5</td>\n",
       "      <td>4</td>\n",
       "      <td>4</td>\n",
       "      <td>8000.0</td>\n",
       "      <td>3</td>\n",
       "      <td>3</td>\n",
       "      <td>120.0</td>\n",
       "      <td>2</td>\n",
       "      <td>4.0</td>\n",
       "      <td>4</td>\n",
       "      <td>4</td>\n",
       "      <td>160</td>\n",
       "      <td>1</td>\n",
       "      <td>1</td>\n",
       "      <td>3</td>\n",
       "      <td>2</td>\n",
       "      <td>2000</td>\n",
       "      <td>2</td>\n",
       "      <td>3</td>\n",
       "      <td>1</td>\n",
       "      <td>1</td>\n",
       "      <td>29</td>\n",
       "      <td>4</td>\n",
       "      <td>0</td>\n",
       "      <td>3</td>\n",
       "      <td>3</td>\n",
       "      <td>1</td>\n",
       "      <td>2</td>\n",
       "      <td>2015/7/21 13:24</td>\n",
       "      <td>2</td>\n",
       "      <td>4</td>\n",
       "      <td>122</td>\n",
       "      <td>2</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>1943</td>\n",
       "      <td>1</td>\n",
       "      <td>28</td>\n",
       "      <td>5</td>\n",
       "      <td>51</td>\n",
       "      <td>4</td>\n",
       "      <td>3</td>\n",
       "      <td>4</td>\n",
       "      <td>12000.0</td>\n",
       "      <td>3</td>\n",
       "      <td>3</td>\n",
       "      <td>78.0</td>\n",
       "      <td>2</td>\n",
       "      <td>5.0</td>\n",
       "      <td>4</td>\n",
       "      <td>4</td>\n",
       "      <td>163</td>\n",
       "      <td>1</td>\n",
       "      <td>1</td>\n",
       "      <td>4</td>\n",
       "      <td>2</td>\n",
       "      <td>6420</td>\n",
       "      <td>4</td>\n",
       "      <td>7</td>\n",
       "      <td>1</td>\n",
       "      <td>1</td>\n",
       "      <td>10</td>\n",
       "      <td>4</td>\n",
       "      <td>1</td>\n",
       "      <td>1</td>\n",
       "      <td>2</td>\n",
       "      <td>1</td>\n",
       "      <td>2</td>\n",
       "      <td>2015/7/25 17:33</td>\n",
       "      <td>2</td>\n",
       "      <td>3</td>\n",
       "      <td>170</td>\n",
       "      <td>4</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4</th>\n",
       "      <td>1994</td>\n",
       "      <td>1</td>\n",
       "      <td>18</td>\n",
       "      <td>1</td>\n",
       "      <td>36</td>\n",
       "      <td>3</td>\n",
       "      <td>12</td>\n",
       "      <td>2</td>\n",
       "      <td>-2.0</td>\n",
       "      <td>4</td>\n",
       "      <td>3</td>\n",
       "      <td>70.0</td>\n",
       "      <td>2</td>\n",
       "      <td>4.0</td>\n",
       "      <td>5</td>\n",
       "      <td>5</td>\n",
       "      <td>165</td>\n",
       "      <td>1</td>\n",
       "      <td>2</td>\n",
       "      <td>5</td>\n",
       "      <td>-8</td>\n",
       "      <td>-1</td>\n",
       "      <td>4</td>\n",
       "      <td>1</td>\n",
       "      <td>1</td>\n",
       "      <td>2</td>\n",
       "      <td>7</td>\n",
       "      <td>3</td>\n",
       "      <td>1</td>\n",
       "      <td>1</td>\n",
       "      <td>4</td>\n",
       "      <td>2</td>\n",
       "      <td>3</td>\n",
       "      <td>2015/8/10 9:50</td>\n",
       "      <td>1</td>\n",
       "      <td>3</td>\n",
       "      <td>110</td>\n",
       "      <td>6</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "   birth  car  city  class  county  depression  edu  equity  family_income  \\\n",
       "0   1959    2    32      3      59           5   11       3        60000.0   \n",
       "1   1992    2    52      6      85           3   12       3        40000.0   \n",
       "2   1967    2    83      5     126           5    4       4         8000.0   \n",
       "3   1943    1    28      5      51           4    3       4        12000.0   \n",
       "4   1994    1    18      1      36           3   12       2           -2.0   \n",
       "\n",
       "   family_m  family_status  floor_area  gender  happiness  health  \\\n",
       "0         2              2        45.0       1        4.0       3   \n",
       "1         3              4       110.0       1        4.0       5   \n",
       "2         3              3       120.0       2        4.0       4   \n",
       "3         3              3        78.0       2        5.0       4   \n",
       "4         4              3        70.0       2        4.0       5   \n",
       "\n",
       "   health_problem  height_cm  house  hukou  id  inc_ability  income  learn  \\\n",
       "0               2        176      1      5   1            3   20000      3   \n",
       "1               4        170      1      1   2            2   20000      3   \n",
       "2               4        160      1      1   3            2    2000      2   \n",
       "3               4        163      1      1   4            2    6420      4   \n",
       "4               5        165      1      2   5           -8      -1      4   \n",
       "\n",
       "   marital  nationality  political  province  relax  religion  religion_freq  \\\n",
       "0        3            1          1        12      4         1              1   \n",
       "1        1            1          1        18      4         1              1   \n",
       "2        3            1          1        29      4         0              3   \n",
       "3        7            1          1        10      4         1              1   \n",
       "4        1            1          2         7      3         1              1   \n",
       "\n",
       "   socialize  status_3_before  status_peer      survey_time  survey_type  \\\n",
       "0          2                2            3   2015/8/4 14:18            1   \n",
       "1          2                1            1  2015/7/21 15:04            2   \n",
       "2          3                1            2  2015/7/21 13:24            2   \n",
       "3          2                1            2  2015/7/25 17:33            2   \n",
       "4          4                2            3   2015/8/10 9:50            1   \n",
       "\n",
       "   view  weight_jin  work_exper  work_manage  work_status  work_type  work_yr  \n",
       "0     4         155           1          2.0          3.0        1.0     30.0  \n",
       "1     4         110           1          3.0          3.0        1.0      2.0  \n",
       "2     4         122           2          NaN          NaN        NaN      NaN  \n",
       "3     3         170           4          NaN          NaN        NaN      NaN  \n",
       "4     3         110           6          NaN          NaN        NaN      NaN  "
      ]
     },
     "execution_count": 61,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "len_df = len(df)\n",
    "df = pd.concat(objs=[train,test], axis=0).reset_index(drop=True)\n",
    "df.head()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 62,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "(10956, 42)"
      ]
     },
     "execution_count": 62,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "df.shape"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 63,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>birth</th>\n",
       "      <th>car</th>\n",
       "      <th>city</th>\n",
       "      <th>class</th>\n",
       "      <th>county</th>\n",
       "      <th>depression</th>\n",
       "      <th>edu</th>\n",
       "      <th>equity</th>\n",
       "      <th>family_income</th>\n",
       "      <th>family_m</th>\n",
       "      <th>family_status</th>\n",
       "      <th>floor_area</th>\n",
       "      <th>gender</th>\n",
       "      <th>happiness</th>\n",
       "      <th>health</th>\n",
       "      <th>health_problem</th>\n",
       "      <th>height_cm</th>\n",
       "      <th>house</th>\n",
       "      <th>hukou</th>\n",
       "      <th>id</th>\n",
       "      <th>inc_ability</th>\n",
       "      <th>income</th>\n",
       "      <th>learn</th>\n",
       "      <th>marital</th>\n",
       "      <th>nationality</th>\n",
       "      <th>political</th>\n",
       "      <th>province</th>\n",
       "      <th>relax</th>\n",
       "      <th>religion</th>\n",
       "      <th>religion_freq</th>\n",
       "      <th>socialize</th>\n",
       "      <th>status_3_before</th>\n",
       "      <th>status_peer</th>\n",
       "      <th>survey_type</th>\n",
       "      <th>view</th>\n",
       "      <th>weight_jin</th>\n",
       "      <th>work_exper</th>\n",
       "      <th>work_manage</th>\n",
       "      <th>work_status</th>\n",
       "      <th>work_type</th>\n",
       "      <th>work_yr</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>count</th>\n",
       "      <td>10956.000000</td>\n",
       "      <td>10956.000000</td>\n",
       "      <td>10956.000000</td>\n",
       "      <td>10956.000000</td>\n",
       "      <td>10956.000000</td>\n",
       "      <td>10956.000000</td>\n",
       "      <td>10956.000000</td>\n",
       "      <td>10956.000000</td>\n",
       "      <td>1.095500e+04</td>\n",
       "      <td>10956.000000</td>\n",
       "      <td>10956.000000</td>\n",
       "      <td>10956.000000</td>\n",
       "      <td>10956.000000</td>\n",
       "      <td>7988.000000</td>\n",
       "      <td>10956.000000</td>\n",
       "      <td>10956.000000</td>\n",
       "      <td>10956.000000</td>\n",
       "      <td>10956.000000</td>\n",
       "      <td>10956.000000</td>\n",
       "      <td>10956.000000</td>\n",
       "      <td>10956.000000</td>\n",
       "      <td>1.095600e+04</td>\n",
       "      <td>10956.000000</td>\n",
       "      <td>10956.000000</td>\n",
       "      <td>10956.000000</td>\n",
       "      <td>10956.000000</td>\n",
       "      <td>10956.000000</td>\n",
       "      <td>10956.000000</td>\n",
       "      <td>10956.000000</td>\n",
       "      <td>10956.000000</td>\n",
       "      <td>10956.000000</td>\n",
       "      <td>10956.000000</td>\n",
       "      <td>10956.000000</td>\n",
       "      <td>10956.00000</td>\n",
       "      <td>10956.000000</td>\n",
       "      <td>10956.000000</td>\n",
       "      <td>10956.000000</td>\n",
       "      <td>4025.000000</td>\n",
       "      <td>4024.000000</td>\n",
       "      <td>4025.000000</td>\n",
       "      <td>4024.000000</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>mean</th>\n",
       "      <td>1964.598759</td>\n",
       "      <td>1.819642</td>\n",
       "      <td>42.680723</td>\n",
       "      <td>4.203359</td>\n",
       "      <td>70.807959</td>\n",
       "      <td>3.814074</td>\n",
       "      <td>4.859985</td>\n",
       "      <td>3.135360</td>\n",
       "      <td>6.636564e+04</td>\n",
       "      <td>2.881891</td>\n",
       "      <td>2.593830</td>\n",
       "      <td>116.023405</td>\n",
       "      <td>1.532129</td>\n",
       "      <td>3.867927</td>\n",
       "      <td>3.602227</td>\n",
       "      <td>3.796915</td>\n",
       "      <td>163.901789</td>\n",
       "      <td>1.069551</td>\n",
       "      <td>1.889376</td>\n",
       "      <td>5486.930267</td>\n",
       "      <td>1.097298</td>\n",
       "      <td>3.101968e+04</td>\n",
       "      <td>1.926250</td>\n",
       "      <td>3.242242</td>\n",
       "      <td>1.367652</td>\n",
       "      <td>1.325849</td>\n",
       "      <td>15.197882</td>\n",
       "      <td>3.299744</td>\n",
       "      <td>0.775739</td>\n",
       "      <td>1.429080</td>\n",
       "      <td>2.801752</td>\n",
       "      <td>1.708105</td>\n",
       "      <td>2.229372</td>\n",
       "      <td>1.41046</td>\n",
       "      <td>3.295089</td>\n",
       "      <td>121.370482</td>\n",
       "      <td>2.983936</td>\n",
       "      <td>2.643478</td>\n",
       "      <td>3.150845</td>\n",
       "      <td>0.912298</td>\n",
       "      <td>14.449056</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>std</th>\n",
       "      <td>16.901752</td>\n",
       "      <td>0.488070</td>\n",
       "      <td>27.174002</td>\n",
       "      <td>2.011036</td>\n",
       "      <td>38.675738</td>\n",
       "      <td>1.075696</td>\n",
       "      <td>3.163190</td>\n",
       "      <td>1.302817</td>\n",
       "      <td>2.837421e+05</td>\n",
       "      <td>1.504206</td>\n",
       "      <td>1.063074</td>\n",
       "      <td>90.915621</td>\n",
       "      <td>0.498989</td>\n",
       "      <td>0.818717</td>\n",
       "      <td>1.102775</td>\n",
       "      <td>1.331880</td>\n",
       "      <td>8.090070</td>\n",
       "      <td>1.199612</td>\n",
       "      <td>1.341876</td>\n",
       "      <td>3166.555394</td>\n",
       "      <td>3.407462</td>\n",
       "      <td>2.003299e+05</td>\n",
       "      <td>1.180954</td>\n",
       "      <td>1.432144</td>\n",
       "      <td>1.496111</td>\n",
       "      <td>1.101044</td>\n",
       "      <td>8.912911</td>\n",
       "      <td>1.059940</td>\n",
       "      <td>1.052262</td>\n",
       "      <td>1.414662</td>\n",
       "      <td>1.067310</td>\n",
       "      <td>0.928897</td>\n",
       "      <td>0.946134</td>\n",
       "      <td>0.49194</td>\n",
       "      <td>2.025916</td>\n",
       "      <td>23.150963</td>\n",
       "      <td>1.752436</td>\n",
       "      <td>1.748856</td>\n",
       "      <td>1.739672</td>\n",
       "      <td>1.392793</td>\n",
       "      <td>11.389993</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>min</th>\n",
       "      <td>1920.000000</td>\n",
       "      <td>-8.000000</td>\n",
       "      <td>1.000000</td>\n",
       "      <td>-8.000000</td>\n",
       "      <td>1.000000</td>\n",
       "      <td>-8.000000</td>\n",
       "      <td>-8.000000</td>\n",
       "      <td>-8.000000</td>\n",
       "      <td>-3.000000e+00</td>\n",
       "      <td>-3.000000</td>\n",
       "      <td>-8.000000</td>\n",
       "      <td>0.000000</td>\n",
       "      <td>1.000000</td>\n",
       "      <td>1.000000</td>\n",
       "      <td>-8.000000</td>\n",
       "      <td>-8.000000</td>\n",
       "      <td>100.000000</td>\n",
       "      <td>-3.000000</td>\n",
       "      <td>1.000000</td>\n",
       "      <td>1.000000</td>\n",
       "      <td>-8.000000</td>\n",
       "      <td>-3.000000e+00</td>\n",
       "      <td>-8.000000</td>\n",
       "      <td>1.000000</td>\n",
       "      <td>-8.000000</td>\n",
       "      <td>-8.000000</td>\n",
       "      <td>1.000000</td>\n",
       "      <td>-8.000000</td>\n",
       "      <td>-8.000000</td>\n",
       "      <td>-8.000000</td>\n",
       "      <td>-8.000000</td>\n",
       "      <td>-8.000000</td>\n",
       "      <td>-8.000000</td>\n",
       "      <td>1.00000</td>\n",
       "      <td>-8.000000</td>\n",
       "      <td>40.000000</td>\n",
       "      <td>1.000000</td>\n",
       "      <td>-8.000000</td>\n",
       "      <td>-8.000000</td>\n",
       "      <td>-8.000000</td>\n",
       "      <td>-3.000000</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>25%</th>\n",
       "      <td>1952.000000</td>\n",
       "      <td>2.000000</td>\n",
       "      <td>18.000000</td>\n",
       "      <td>3.000000</td>\n",
       "      <td>38.000000</td>\n",
       "      <td>3.000000</td>\n",
       "      <td>3.000000</td>\n",
       "      <td>2.000000</td>\n",
       "      <td>1.300000e+04</td>\n",
       "      <td>2.000000</td>\n",
       "      <td>2.000000</td>\n",
       "      <td>64.600000</td>\n",
       "      <td>1.000000</td>\n",
       "      <td>4.000000</td>\n",
       "      <td>3.000000</td>\n",
       "      <td>3.000000</td>\n",
       "      <td>158.000000</td>\n",
       "      <td>1.000000</td>\n",
       "      <td>1.000000</td>\n",
       "      <td>2744.750000</td>\n",
       "      <td>2.000000</td>\n",
       "      <td>1.700000e+03</td>\n",
       "      <td>1.000000</td>\n",
       "      <td>3.000000</td>\n",
       "      <td>1.000000</td>\n",
       "      <td>1.000000</td>\n",
       "      <td>7.000000</td>\n",
       "      <td>3.000000</td>\n",
       "      <td>1.000000</td>\n",
       "      <td>1.000000</td>\n",
       "      <td>2.000000</td>\n",
       "      <td>1.000000</td>\n",
       "      <td>2.000000</td>\n",
       "      <td>1.00000</td>\n",
       "      <td>3.000000</td>\n",
       "      <td>105.000000</td>\n",
       "      <td>1.000000</td>\n",
       "      <td>2.000000</td>\n",
       "      <td>3.000000</td>\n",
       "      <td>1.000000</td>\n",
       "      <td>5.000000</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>50%</th>\n",
       "      <td>1965.000000</td>\n",
       "      <td>2.000000</td>\n",
       "      <td>42.000000</td>\n",
       "      <td>5.000000</td>\n",
       "      <td>73.000000</td>\n",
       "      <td>4.000000</td>\n",
       "      <td>4.000000</td>\n",
       "      <td>3.000000</td>\n",
       "      <td>3.840000e+04</td>\n",
       "      <td>3.000000</td>\n",
       "      <td>3.000000</td>\n",
       "      <td>98.000000</td>\n",
       "      <td>2.000000</td>\n",
       "      <td>4.000000</td>\n",
       "      <td>4.000000</td>\n",
       "      <td>4.000000</td>\n",
       "      <td>164.000000</td>\n",
       "      <td>1.000000</td>\n",
       "      <td>1.000000</td>\n",
       "      <td>5487.500000</td>\n",
       "      <td>2.000000</td>\n",
       "      <td>1.500000e+04</td>\n",
       "      <td>2.000000</td>\n",
       "      <td>3.000000</td>\n",
       "      <td>1.000000</td>\n",
       "      <td>1.000000</td>\n",
       "      <td>15.000000</td>\n",
       "      <td>3.000000</td>\n",
       "      <td>1.000000</td>\n",
       "      <td>1.000000</td>\n",
       "      <td>3.000000</td>\n",
       "      <td>2.000000</td>\n",
       "      <td>2.000000</td>\n",
       "      <td>1.00000</td>\n",
       "      <td>4.000000</td>\n",
       "      <td>120.000000</td>\n",
       "      <td>3.000000</td>\n",
       "      <td>3.000000</td>\n",
       "      <td>3.000000</td>\n",
       "      <td>1.000000</td>\n",
       "      <td>12.000000</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>75%</th>\n",
       "      <td>1977.000000</td>\n",
       "      <td>2.000000</td>\n",
       "      <td>65.000000</td>\n",
       "      <td>5.000000</td>\n",
       "      <td>104.000000</td>\n",
       "      <td>5.000000</td>\n",
       "      <td>6.000000</td>\n",
       "      <td>4.000000</td>\n",
       "      <td>7.000000e+04</td>\n",
       "      <td>4.000000</td>\n",
       "      <td>3.000000</td>\n",
       "      <td>135.000000</td>\n",
       "      <td>2.000000</td>\n",
       "      <td>4.000000</td>\n",
       "      <td>4.000000</td>\n",
       "      <td>5.000000</td>\n",
       "      <td>170.000000</td>\n",
       "      <td>1.000000</td>\n",
       "      <td>2.000000</td>\n",
       "      <td>8229.250000</td>\n",
       "      <td>3.000000</td>\n",
       "      <td>3.500000e+04</td>\n",
       "      <td>3.000000</td>\n",
       "      <td>3.000000</td>\n",
       "      <td>1.000000</td>\n",
       "      <td>1.000000</td>\n",
       "      <td>22.000000</td>\n",
       "      <td>4.000000</td>\n",
       "      <td>1.000000</td>\n",
       "      <td>1.000000</td>\n",
       "      <td>4.000000</td>\n",
       "      <td>2.000000</td>\n",
       "      <td>3.000000</td>\n",
       "      <td>2.00000</td>\n",
       "      <td>4.000000</td>\n",
       "      <td>135.000000</td>\n",
       "      <td>5.000000</td>\n",
       "      <td>3.000000</td>\n",
       "      <td>3.000000</td>\n",
       "      <td>1.000000</td>\n",
       "      <td>22.000000</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>max</th>\n",
       "      <td>1997.000000</td>\n",
       "      <td>2.000000</td>\n",
       "      <td>89.000000</td>\n",
       "      <td>10.000000</td>\n",
       "      <td>134.000000</td>\n",
       "      <td>5.000000</td>\n",
       "      <td>14.000000</td>\n",
       "      <td>5.000000</td>\n",
       "      <td>9.999992e+06</td>\n",
       "      <td>50.000000</td>\n",
       "      <td>5.000000</td>\n",
       "      <td>2400.000000</td>\n",
       "      <td>2.000000</td>\n",
       "      <td>5.000000</td>\n",
       "      <td>5.000000</td>\n",
       "      <td>5.000000</td>\n",
       "      <td>194.000000</td>\n",
       "      <td>96.000000</td>\n",
       "      <td>8.000000</td>\n",
       "      <td>10968.000000</td>\n",
       "      <td>4.000000</td>\n",
       "      <td>9.999990e+06</td>\n",
       "      <td>5.000000</td>\n",
       "      <td>7.000000</td>\n",
       "      <td>8.000000</td>\n",
       "      <td>4.000000</td>\n",
       "      <td>31.000000</td>\n",
       "      <td>5.000000</td>\n",
       "      <td>1.000000</td>\n",
       "      <td>9.000000</td>\n",
       "      <td>5.000000</td>\n",
       "      <td>3.000000</td>\n",
       "      <td>3.000000</td>\n",
       "      <td>2.00000</td>\n",
       "      <td>5.000000</td>\n",
       "      <td>260.000000</td>\n",
       "      <td>6.000000</td>\n",
       "      <td>4.000000</td>\n",
       "      <td>9.000000</td>\n",
       "      <td>2.000000</td>\n",
       "      <td>55.000000</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "              birth           car          city         class        county  \\\n",
       "count  10956.000000  10956.000000  10956.000000  10956.000000  10956.000000   \n",
       "mean    1964.598759      1.819642     42.680723      4.203359     70.807959   \n",
       "std       16.901752      0.488070     27.174002      2.011036     38.675738   \n",
       "min     1920.000000     -8.000000      1.000000     -8.000000      1.000000   \n",
       "25%     1952.000000      2.000000     18.000000      3.000000     38.000000   \n",
       "50%     1965.000000      2.000000     42.000000      5.000000     73.000000   \n",
       "75%     1977.000000      2.000000     65.000000      5.000000    104.000000   \n",
       "max     1997.000000      2.000000     89.000000     10.000000    134.000000   \n",
       "\n",
       "         depression           edu        equity  family_income      family_m  \\\n",
       "count  10956.000000  10956.000000  10956.000000   1.095500e+04  10956.000000   \n",
       "mean       3.814074      4.859985      3.135360   6.636564e+04      2.881891   \n",
       "std        1.075696      3.163190      1.302817   2.837421e+05      1.504206   \n",
       "min       -8.000000     -8.000000     -8.000000  -3.000000e+00     -3.000000   \n",
       "25%        3.000000      3.000000      2.000000   1.300000e+04      2.000000   \n",
       "50%        4.000000      4.000000      3.000000   3.840000e+04      3.000000   \n",
       "75%        5.000000      6.000000      4.000000   7.000000e+04      4.000000   \n",
       "max        5.000000     14.000000      5.000000   9.999992e+06     50.000000   \n",
       "\n",
       "       family_status    floor_area        gender    happiness        health  \\\n",
       "count   10956.000000  10956.000000  10956.000000  7988.000000  10956.000000   \n",
       "mean        2.593830    116.023405      1.532129     3.867927      3.602227   \n",
       "std         1.063074     90.915621      0.498989     0.818717      1.102775   \n",
       "min        -8.000000      0.000000      1.000000     1.000000     -8.000000   \n",
       "25%         2.000000     64.600000      1.000000     4.000000      3.000000   \n",
       "50%         3.000000     98.000000      2.000000     4.000000      4.000000   \n",
       "75%         3.000000    135.000000      2.000000     4.000000      4.000000   \n",
       "max         5.000000   2400.000000      2.000000     5.000000      5.000000   \n",
       "\n",
       "       health_problem     height_cm         house         hukou            id  \\\n",
       "count    10956.000000  10956.000000  10956.000000  10956.000000  10956.000000   \n",
       "mean         3.796915    163.901789      1.069551      1.889376   5486.930267   \n",
       "std          1.331880      8.090070      1.199612      1.341876   3166.555394   \n",
       "min         -8.000000    100.000000     -3.000000      1.000000      1.000000   \n",
       "25%          3.000000    158.000000      1.000000      1.000000   2744.750000   \n",
       "50%          4.000000    164.000000      1.000000      1.000000   5487.500000   \n",
       "75%          5.000000    170.000000      1.000000      2.000000   8229.250000   \n",
       "max          5.000000    194.000000     96.000000      8.000000  10968.000000   \n",
       "\n",
       "        inc_ability        income         learn       marital   nationality  \\\n",
       "count  10956.000000  1.095600e+04  10956.000000  10956.000000  10956.000000   \n",
       "mean       1.097298  3.101968e+04      1.926250      3.242242      1.367652   \n",
       "std        3.407462  2.003299e+05      1.180954      1.432144      1.496111   \n",
       "min       -8.000000 -3.000000e+00     -8.000000      1.000000     -8.000000   \n",
       "25%        2.000000  1.700000e+03      1.000000      3.000000      1.000000   \n",
       "50%        2.000000  1.500000e+04      2.000000      3.000000      1.000000   \n",
       "75%        3.000000  3.500000e+04      3.000000      3.000000      1.000000   \n",
       "max        4.000000  9.999990e+06      5.000000      7.000000      8.000000   \n",
       "\n",
       "          political      province         relax      religion  religion_freq  \\\n",
       "count  10956.000000  10956.000000  10956.000000  10956.000000   10956.000000   \n",
       "mean       1.325849     15.197882      3.299744      0.775739       1.429080   \n",
       "std        1.101044      8.912911      1.059940      1.052262       1.414662   \n",
       "min       -8.000000      1.000000     -8.000000     -8.000000      -8.000000   \n",
       "25%        1.000000      7.000000      3.000000      1.000000       1.000000   \n",
       "50%        1.000000     15.000000      3.000000      1.000000       1.000000   \n",
       "75%        1.000000     22.000000      4.000000      1.000000       1.000000   \n",
       "max        4.000000     31.000000      5.000000      1.000000       9.000000   \n",
       "\n",
       "          socialize  status_3_before   status_peer  survey_type          view  \\\n",
       "count  10956.000000     10956.000000  10956.000000  10956.00000  10956.000000   \n",
       "mean       2.801752         1.708105      2.229372      1.41046      3.295089   \n",
       "std        1.067310         0.928897      0.946134      0.49194      2.025916   \n",
       "min       -8.000000        -8.000000     -8.000000      1.00000     -8.000000   \n",
       "25%        2.000000         1.000000      2.000000      1.00000      3.000000   \n",
       "50%        3.000000         2.000000      2.000000      1.00000      4.000000   \n",
       "75%        4.000000         2.000000      3.000000      2.00000      4.000000   \n",
       "max        5.000000         3.000000      3.000000      2.00000      5.000000   \n",
       "\n",
       "         weight_jin    work_exper  work_manage  work_status    work_type  \\\n",
       "count  10956.000000  10956.000000  4025.000000  4024.000000  4025.000000   \n",
       "mean     121.370482      2.983936     2.643478     3.150845     0.912298   \n",
       "std       23.150963      1.752436     1.748856     1.739672     1.392793   \n",
       "min       40.000000      1.000000    -8.000000    -8.000000    -8.000000   \n",
       "25%      105.000000      1.000000     2.000000     3.000000     1.000000   \n",
       "50%      120.000000      3.000000     3.000000     3.000000     1.000000   \n",
       "75%      135.000000      5.000000     3.000000     3.000000     1.000000   \n",
       "max      260.000000      6.000000     4.000000     9.000000     2.000000   \n",
       "\n",
       "           work_yr  \n",
       "count  4024.000000  \n",
       "mean     14.449056  \n",
       "std      11.389993  \n",
       "min      -3.000000  \n",
       "25%       5.000000  \n",
       "50%      12.000000  \n",
       "75%      22.000000  \n",
       "max      55.000000  "
      ]
     },
     "execution_count": 63,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "df.describe()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 64,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "birth                 0\n",
       "car                   0\n",
       "city                  0\n",
       "class                 0\n",
       "county                0\n",
       "depression            0\n",
       "edu                   0\n",
       "equity                0\n",
       "family_income         1\n",
       "family_m              0\n",
       "family_status         0\n",
       "floor_area            0\n",
       "gender                0\n",
       "happiness          2968\n",
       "health                0\n",
       "health_problem        0\n",
       "height_cm             0\n",
       "house                 0\n",
       "hukou                 0\n",
       "id                    0\n",
       "inc_ability           0\n",
       "income                0\n",
       "learn                 0\n",
       "marital               0\n",
       "nationality           0\n",
       "political             0\n",
       "province              0\n",
       "relax                 0\n",
       "religion              0\n",
       "religion_freq         0\n",
       "socialize             0\n",
       "status_3_before       0\n",
       "status_peer           0\n",
       "survey_time           0\n",
       "survey_type           0\n",
       "view                  0\n",
       "weight_jin            0\n",
       "work_exper            0\n",
       "work_manage        6931\n",
       "work_status        6932\n",
       "work_type          6931\n",
       "work_yr            6932\n",
       "dtype: int64"
      ]
     },
     "execution_count": 64,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "df.isnull().sum()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 65,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>birth</th>\n",
       "      <th>car</th>\n",
       "      <th>city</th>\n",
       "      <th>class</th>\n",
       "      <th>county</th>\n",
       "      <th>depression</th>\n",
       "      <th>edu</th>\n",
       "      <th>equity</th>\n",
       "      <th>family_income</th>\n",
       "      <th>family_m</th>\n",
       "      <th>family_status</th>\n",
       "      <th>floor_area</th>\n",
       "      <th>gender</th>\n",
       "      <th>happiness</th>\n",
       "      <th>health</th>\n",
       "      <th>health_problem</th>\n",
       "      <th>height_cm</th>\n",
       "      <th>house</th>\n",
       "      <th>hukou</th>\n",
       "      <th>id</th>\n",
       "      <th>inc_ability</th>\n",
       "      <th>income</th>\n",
       "      <th>learn</th>\n",
       "      <th>marital</th>\n",
       "      <th>nationality</th>\n",
       "      <th>political</th>\n",
       "      <th>province</th>\n",
       "      <th>relax</th>\n",
       "      <th>religion</th>\n",
       "      <th>religion_freq</th>\n",
       "      <th>socialize</th>\n",
       "      <th>status_3_before</th>\n",
       "      <th>status_peer</th>\n",
       "      <th>survey_type</th>\n",
       "      <th>view</th>\n",
       "      <th>weight_jin</th>\n",
       "      <th>work_exper</th>\n",
       "      <th>work_manage</th>\n",
       "      <th>work_status</th>\n",
       "      <th>work_type</th>\n",
       "      <th>work_yr</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>count</th>\n",
       "      <td>10956.000000</td>\n",
       "      <td>10956.000000</td>\n",
       "      <td>10956.000000</td>\n",
       "      <td>10956.000000</td>\n",
       "      <td>10956.000000</td>\n",
       "      <td>10956.000000</td>\n",
       "      <td>10956.000000</td>\n",
       "      <td>10956.000000</td>\n",
       "      <td>1.095500e+04</td>\n",
       "      <td>10956.000000</td>\n",
       "      <td>10956.000000</td>\n",
       "      <td>10956.000000</td>\n",
       "      <td>10956.000000</td>\n",
       "      <td>7988.000000</td>\n",
       "      <td>10956.000000</td>\n",
       "      <td>10956.000000</td>\n",
       "      <td>10956.000000</td>\n",
       "      <td>10956.000000</td>\n",
       "      <td>10956.000000</td>\n",
       "      <td>10956.000000</td>\n",
       "      <td>10956.000000</td>\n",
       "      <td>1.095600e+04</td>\n",
       "      <td>10956.000000</td>\n",
       "      <td>10956.000000</td>\n",
       "      <td>10956.000000</td>\n",
       "      <td>10956.000000</td>\n",
       "      <td>10956.000000</td>\n",
       "      <td>10956.000000</td>\n",
       "      <td>10956.000000</td>\n",
       "      <td>10956.000000</td>\n",
       "      <td>10956.000000</td>\n",
       "      <td>10956.000000</td>\n",
       "      <td>10956.000000</td>\n",
       "      <td>10956.00000</td>\n",
       "      <td>10956.000000</td>\n",
       "      <td>10956.000000</td>\n",
       "      <td>10956.000000</td>\n",
       "      <td>4025.000000</td>\n",
       "      <td>4024.000000</td>\n",
       "      <td>4025.000000</td>\n",
       "      <td>4024.000000</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>mean</th>\n",
       "      <td>1964.598759</td>\n",
       "      <td>1.819642</td>\n",
       "      <td>42.680723</td>\n",
       "      <td>4.203359</td>\n",
       "      <td>70.807959</td>\n",
       "      <td>3.814074</td>\n",
       "      <td>4.859985</td>\n",
       "      <td>3.135360</td>\n",
       "      <td>6.636564e+04</td>\n",
       "      <td>2.881891</td>\n",
       "      <td>2.593830</td>\n",
       "      <td>116.023405</td>\n",
       "      <td>1.532129</td>\n",
       "      <td>3.867927</td>\n",
       "      <td>3.602227</td>\n",
       "      <td>3.796915</td>\n",
       "      <td>163.901789</td>\n",
       "      <td>1.069551</td>\n",
       "      <td>1.889376</td>\n",
       "      <td>5486.930267</td>\n",
       "      <td>1.097298</td>\n",
       "      <td>3.101968e+04</td>\n",
       "      <td>1.926250</td>\n",
       "      <td>3.242242</td>\n",
       "      <td>1.367652</td>\n",
       "      <td>1.325849</td>\n",
       "      <td>15.197882</td>\n",
       "      <td>3.299744</td>\n",
       "      <td>0.775739</td>\n",
       "      <td>1.429080</td>\n",
       "      <td>2.801752</td>\n",
       "      <td>1.708105</td>\n",
       "      <td>2.229372</td>\n",
       "      <td>1.41046</td>\n",
       "      <td>3.295089</td>\n",
       "      <td>121.370482</td>\n",
       "      <td>2.983936</td>\n",
       "      <td>2.643478</td>\n",
       "      <td>3.150845</td>\n",
       "      <td>0.912298</td>\n",
       "      <td>14.449056</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>std</th>\n",
       "      <td>16.901752</td>\n",
       "      <td>0.488070</td>\n",
       "      <td>27.174002</td>\n",
       "      <td>2.011036</td>\n",
       "      <td>38.675738</td>\n",
       "      <td>1.075696</td>\n",
       "      <td>3.163190</td>\n",
       "      <td>1.302817</td>\n",
       "      <td>2.837421e+05</td>\n",
       "      <td>1.504206</td>\n",
       "      <td>1.063074</td>\n",
       "      <td>90.915621</td>\n",
       "      <td>0.498989</td>\n",
       "      <td>0.818717</td>\n",
       "      <td>1.102775</td>\n",
       "      <td>1.331880</td>\n",
       "      <td>8.090070</td>\n",
       "      <td>1.199612</td>\n",
       "      <td>1.341876</td>\n",
       "      <td>3166.555394</td>\n",
       "      <td>3.407462</td>\n",
       "      <td>2.003299e+05</td>\n",
       "      <td>1.180954</td>\n",
       "      <td>1.432144</td>\n",
       "      <td>1.496111</td>\n",
       "      <td>1.101044</td>\n",
       "      <td>8.912911</td>\n",
       "      <td>1.059940</td>\n",
       "      <td>1.052262</td>\n",
       "      <td>1.414662</td>\n",
       "      <td>1.067310</td>\n",
       "      <td>0.928897</td>\n",
       "      <td>0.946134</td>\n",
       "      <td>0.49194</td>\n",
       "      <td>2.025916</td>\n",
       "      <td>23.150963</td>\n",
       "      <td>1.752436</td>\n",
       "      <td>1.748856</td>\n",
       "      <td>1.739672</td>\n",
       "      <td>1.392793</td>\n",
       "      <td>11.389993</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>min</th>\n",
       "      <td>1920.000000</td>\n",
       "      <td>-8.000000</td>\n",
       "      <td>1.000000</td>\n",
       "      <td>-8.000000</td>\n",
       "      <td>1.000000</td>\n",
       "      <td>-8.000000</td>\n",
       "      <td>-8.000000</td>\n",
       "      <td>-8.000000</td>\n",
       "      <td>-3.000000e+00</td>\n",
       "      <td>-3.000000</td>\n",
       "      <td>-8.000000</td>\n",
       "      <td>0.000000</td>\n",
       "      <td>1.000000</td>\n",
       "      <td>1.000000</td>\n",
       "      <td>-8.000000</td>\n",
       "      <td>-8.000000</td>\n",
       "      <td>100.000000</td>\n",
       "      <td>-3.000000</td>\n",
       "      <td>1.000000</td>\n",
       "      <td>1.000000</td>\n",
       "      <td>-8.000000</td>\n",
       "      <td>-3.000000e+00</td>\n",
       "      <td>-8.000000</td>\n",
       "      <td>1.000000</td>\n",
       "      <td>-8.000000</td>\n",
       "      <td>-8.000000</td>\n",
       "      <td>1.000000</td>\n",
       "      <td>-8.000000</td>\n",
       "      <td>-8.000000</td>\n",
       "      <td>-8.000000</td>\n",
       "      <td>-8.000000</td>\n",
       "      <td>-8.000000</td>\n",
       "      <td>-8.000000</td>\n",
       "      <td>1.00000</td>\n",
       "      <td>-8.000000</td>\n",
       "      <td>40.000000</td>\n",
       "      <td>1.000000</td>\n",
       "      <td>-8.000000</td>\n",
       "      <td>-8.000000</td>\n",
       "      <td>-8.000000</td>\n",
       "      <td>-3.000000</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>25%</th>\n",
       "      <td>1952.000000</td>\n",
       "      <td>2.000000</td>\n",
       "      <td>18.000000</td>\n",
       "      <td>3.000000</td>\n",
       "      <td>38.000000</td>\n",
       "      <td>3.000000</td>\n",
       "      <td>3.000000</td>\n",
       "      <td>2.000000</td>\n",
       "      <td>1.300000e+04</td>\n",
       "      <td>2.000000</td>\n",
       "      <td>2.000000</td>\n",
       "      <td>64.600000</td>\n",
       "      <td>1.000000</td>\n",
       "      <td>4.000000</td>\n",
       "      <td>3.000000</td>\n",
       "      <td>3.000000</td>\n",
       "      <td>158.000000</td>\n",
       "      <td>1.000000</td>\n",
       "      <td>1.000000</td>\n",
       "      <td>2744.750000</td>\n",
       "      <td>2.000000</td>\n",
       "      <td>1.700000e+03</td>\n",
       "      <td>1.000000</td>\n",
       "      <td>3.000000</td>\n",
       "      <td>1.000000</td>\n",
       "      <td>1.000000</td>\n",
       "      <td>7.000000</td>\n",
       "      <td>3.000000</td>\n",
       "      <td>1.000000</td>\n",
       "      <td>1.000000</td>\n",
       "      <td>2.000000</td>\n",
       "      <td>1.000000</td>\n",
       "      <td>2.000000</td>\n",
       "      <td>1.00000</td>\n",
       "      <td>3.000000</td>\n",
       "      <td>105.000000</td>\n",
       "      <td>1.000000</td>\n",
       "      <td>2.000000</td>\n",
       "      <td>3.000000</td>\n",
       "      <td>1.000000</td>\n",
       "      <td>5.000000</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>50%</th>\n",
       "      <td>1965.000000</td>\n",
       "      <td>2.000000</td>\n",
       "      <td>42.000000</td>\n",
       "      <td>5.000000</td>\n",
       "      <td>73.000000</td>\n",
       "      <td>4.000000</td>\n",
       "      <td>4.000000</td>\n",
       "      <td>3.000000</td>\n",
       "      <td>3.840000e+04</td>\n",
       "      <td>3.000000</td>\n",
       "      <td>3.000000</td>\n",
       "      <td>98.000000</td>\n",
       "      <td>2.000000</td>\n",
       "      <td>4.000000</td>\n",
       "      <td>4.000000</td>\n",
       "      <td>4.000000</td>\n",
       "      <td>164.000000</td>\n",
       "      <td>1.000000</td>\n",
       "      <td>1.000000</td>\n",
       "      <td>5487.500000</td>\n",
       "      <td>2.000000</td>\n",
       "      <td>1.500000e+04</td>\n",
       "      <td>2.000000</td>\n",
       "      <td>3.000000</td>\n",
       "      <td>1.000000</td>\n",
       "      <td>1.000000</td>\n",
       "      <td>15.000000</td>\n",
       "      <td>3.000000</td>\n",
       "      <td>1.000000</td>\n",
       "      <td>1.000000</td>\n",
       "      <td>3.000000</td>\n",
       "      <td>2.000000</td>\n",
       "      <td>2.000000</td>\n",
       "      <td>1.00000</td>\n",
       "      <td>4.000000</td>\n",
       "      <td>120.000000</td>\n",
       "      <td>3.000000</td>\n",
       "      <td>3.000000</td>\n",
       "      <td>3.000000</td>\n",
       "      <td>1.000000</td>\n",
       "      <td>12.000000</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>75%</th>\n",
       "      <td>1977.000000</td>\n",
       "      <td>2.000000</td>\n",
       "      <td>65.000000</td>\n",
       "      <td>5.000000</td>\n",
       "      <td>104.000000</td>\n",
       "      <td>5.000000</td>\n",
       "      <td>6.000000</td>\n",
       "      <td>4.000000</td>\n",
       "      <td>7.000000e+04</td>\n",
       "      <td>4.000000</td>\n",
       "      <td>3.000000</td>\n",
       "      <td>135.000000</td>\n",
       "      <td>2.000000</td>\n",
       "      <td>4.000000</td>\n",
       "      <td>4.000000</td>\n",
       "      <td>5.000000</td>\n",
       "      <td>170.000000</td>\n",
       "      <td>1.000000</td>\n",
       "      <td>2.000000</td>\n",
       "      <td>8229.250000</td>\n",
       "      <td>3.000000</td>\n",
       "      <td>3.500000e+04</td>\n",
       "      <td>3.000000</td>\n",
       "      <td>3.000000</td>\n",
       "      <td>1.000000</td>\n",
       "      <td>1.000000</td>\n",
       "      <td>22.000000</td>\n",
       "      <td>4.000000</td>\n",
       "      <td>1.000000</td>\n",
       "      <td>1.000000</td>\n",
       "      <td>4.000000</td>\n",
       "      <td>2.000000</td>\n",
       "      <td>3.000000</td>\n",
       "      <td>2.00000</td>\n",
       "      <td>4.000000</td>\n",
       "      <td>135.000000</td>\n",
       "      <td>5.000000</td>\n",
       "      <td>3.000000</td>\n",
       "      <td>3.000000</td>\n",
       "      <td>1.000000</td>\n",
       "      <td>22.000000</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>max</th>\n",
       "      <td>1997.000000</td>\n",
       "      <td>2.000000</td>\n",
       "      <td>89.000000</td>\n",
       "      <td>10.000000</td>\n",
       "      <td>134.000000</td>\n",
       "      <td>5.000000</td>\n",
       "      <td>14.000000</td>\n",
       "      <td>5.000000</td>\n",
       "      <td>9.999992e+06</td>\n",
       "      <td>50.000000</td>\n",
       "      <td>5.000000</td>\n",
       "      <td>2400.000000</td>\n",
       "      <td>2.000000</td>\n",
       "      <td>5.000000</td>\n",
       "      <td>5.000000</td>\n",
       "      <td>5.000000</td>\n",
       "      <td>194.000000</td>\n",
       "      <td>96.000000</td>\n",
       "      <td>8.000000</td>\n",
       "      <td>10968.000000</td>\n",
       "      <td>4.000000</td>\n",
       "      <td>9.999990e+06</td>\n",
       "      <td>5.000000</td>\n",
       "      <td>7.000000</td>\n",
       "      <td>8.000000</td>\n",
       "      <td>4.000000</td>\n",
       "      <td>31.000000</td>\n",
       "      <td>5.000000</td>\n",
       "      <td>1.000000</td>\n",
       "      <td>9.000000</td>\n",
       "      <td>5.000000</td>\n",
       "      <td>3.000000</td>\n",
       "      <td>3.000000</td>\n",
       "      <td>2.00000</td>\n",
       "      <td>5.000000</td>\n",
       "      <td>260.000000</td>\n",
       "      <td>6.000000</td>\n",
       "      <td>4.000000</td>\n",
       "      <td>9.000000</td>\n",
       "      <td>2.000000</td>\n",
       "      <td>55.000000</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "              birth           car          city         class        county  \\\n",
       "count  10956.000000  10956.000000  10956.000000  10956.000000  10956.000000   \n",
       "mean    1964.598759      1.819642     42.680723      4.203359     70.807959   \n",
       "std       16.901752      0.488070     27.174002      2.011036     38.675738   \n",
       "min     1920.000000     -8.000000      1.000000     -8.000000      1.000000   \n",
       "25%     1952.000000      2.000000     18.000000      3.000000     38.000000   \n",
       "50%     1965.000000      2.000000     42.000000      5.000000     73.000000   \n",
       "75%     1977.000000      2.000000     65.000000      5.000000    104.000000   \n",
       "max     1997.000000      2.000000     89.000000     10.000000    134.000000   \n",
       "\n",
       "         depression           edu        equity  family_income      family_m  \\\n",
       "count  10956.000000  10956.000000  10956.000000   1.095500e+04  10956.000000   \n",
       "mean       3.814074      4.859985      3.135360   6.636564e+04      2.881891   \n",
       "std        1.075696      3.163190      1.302817   2.837421e+05      1.504206   \n",
       "min       -8.000000     -8.000000     -8.000000  -3.000000e+00     -3.000000   \n",
       "25%        3.000000      3.000000      2.000000   1.300000e+04      2.000000   \n",
       "50%        4.000000      4.000000      3.000000   3.840000e+04      3.000000   \n",
       "75%        5.000000      6.000000      4.000000   7.000000e+04      4.000000   \n",
       "max        5.000000     14.000000      5.000000   9.999992e+06     50.000000   \n",
       "\n",
       "       family_status    floor_area        gender    happiness        health  \\\n",
       "count   10956.000000  10956.000000  10956.000000  7988.000000  10956.000000   \n",
       "mean        2.593830    116.023405      1.532129     3.867927      3.602227   \n",
       "std         1.063074     90.915621      0.498989     0.818717      1.102775   \n",
       "min        -8.000000      0.000000      1.000000     1.000000     -8.000000   \n",
       "25%         2.000000     64.600000      1.000000     4.000000      3.000000   \n",
       "50%         3.000000     98.000000      2.000000     4.000000      4.000000   \n",
       "75%         3.000000    135.000000      2.000000     4.000000      4.000000   \n",
       "max         5.000000   2400.000000      2.000000     5.000000      5.000000   \n",
       "\n",
       "       health_problem     height_cm         house         hukou            id  \\\n",
       "count    10956.000000  10956.000000  10956.000000  10956.000000  10956.000000   \n",
       "mean         3.796915    163.901789      1.069551      1.889376   5486.930267   \n",
       "std          1.331880      8.090070      1.199612      1.341876   3166.555394   \n",
       "min         -8.000000    100.000000     -3.000000      1.000000      1.000000   \n",
       "25%          3.000000    158.000000      1.000000      1.000000   2744.750000   \n",
       "50%          4.000000    164.000000      1.000000      1.000000   5487.500000   \n",
       "75%          5.000000    170.000000      1.000000      2.000000   8229.250000   \n",
       "max          5.000000    194.000000     96.000000      8.000000  10968.000000   \n",
       "\n",
       "        inc_ability        income         learn       marital   nationality  \\\n",
       "count  10956.000000  1.095600e+04  10956.000000  10956.000000  10956.000000   \n",
       "mean       1.097298  3.101968e+04      1.926250      3.242242      1.367652   \n",
       "std        3.407462  2.003299e+05      1.180954      1.432144      1.496111   \n",
       "min       -8.000000 -3.000000e+00     -8.000000      1.000000     -8.000000   \n",
       "25%        2.000000  1.700000e+03      1.000000      3.000000      1.000000   \n",
       "50%        2.000000  1.500000e+04      2.000000      3.000000      1.000000   \n",
       "75%        3.000000  3.500000e+04      3.000000      3.000000      1.000000   \n",
       "max        4.000000  9.999990e+06      5.000000      7.000000      8.000000   \n",
       "\n",
       "          political      province         relax      religion  religion_freq  \\\n",
       "count  10956.000000  10956.000000  10956.000000  10956.000000   10956.000000   \n",
       "mean       1.325849     15.197882      3.299744      0.775739       1.429080   \n",
       "std        1.101044      8.912911      1.059940      1.052262       1.414662   \n",
       "min       -8.000000      1.000000     -8.000000     -8.000000      -8.000000   \n",
       "25%        1.000000      7.000000      3.000000      1.000000       1.000000   \n",
       "50%        1.000000     15.000000      3.000000      1.000000       1.000000   \n",
       "75%        1.000000     22.000000      4.000000      1.000000       1.000000   \n",
       "max        4.000000     31.000000      5.000000      1.000000       9.000000   \n",
       "\n",
       "          socialize  status_3_before   status_peer  survey_type          view  \\\n",
       "count  10956.000000     10956.000000  10956.000000  10956.00000  10956.000000   \n",
       "mean       2.801752         1.708105      2.229372      1.41046      3.295089   \n",
       "std        1.067310         0.928897      0.946134      0.49194      2.025916   \n",
       "min       -8.000000        -8.000000     -8.000000      1.00000     -8.000000   \n",
       "25%        2.000000         1.000000      2.000000      1.00000      3.000000   \n",
       "50%        3.000000         2.000000      2.000000      1.00000      4.000000   \n",
       "75%        4.000000         2.000000      3.000000      2.00000      4.000000   \n",
       "max        5.000000         3.000000      3.000000      2.00000      5.000000   \n",
       "\n",
       "         weight_jin    work_exper  work_manage  work_status    work_type  \\\n",
       "count  10956.000000  10956.000000  4025.000000  4024.000000  4025.000000   \n",
       "mean     121.370482      2.983936     2.643478     3.150845     0.912298   \n",
       "std       23.150963      1.752436     1.748856     1.739672     1.392793   \n",
       "min       40.000000      1.000000    -8.000000    -8.000000    -8.000000   \n",
       "25%      105.000000      1.000000     2.000000     3.000000     1.000000   \n",
       "50%      120.000000      3.000000     3.000000     3.000000     1.000000   \n",
       "75%      135.000000      5.000000     3.000000     3.000000     1.000000   \n",
       "max      260.000000      6.000000     4.000000     9.000000     2.000000   \n",
       "\n",
       "           work_yr  \n",
       "count  4024.000000  \n",
       "mean     14.449056  \n",
       "std      11.389993  \n",
       "min      -3.000000  \n",
       "25%       5.000000  \n",
       "50%      12.000000  \n",
       "75%      22.000000  \n",
       "max      55.000000  "
      ]
     },
     "execution_count": 65,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "df.describe()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 66,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "[1 2]\n",
      "1    6459\n",
      "2    4497\n",
      "Name: survey_type, dtype: int64\n"
     ]
    },
    {
     "data": {
      "text/plain": [
       "<matplotlib.axes._subplots.AxesSubplot at 0x2142157aa58>"
      ]
     },
     "execution_count": 66,
     "metadata": {},
     "output_type": "execute_result"
    },
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAYEAAAEKCAYAAAD0Luk/AAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAADl0RVh0U29mdHdhcmUAbWF0cGxvdGxpYiB2ZXJzaW9uI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MaYrM3zgF+ZmbfA/YCfx1s/hiw0szWEwuPT+PYxULgBTPb4+6jEt8DkcTRLaIiIhGmy0EiIhGmEBARiTCFgIhIhCkEREQiTCEgIhJhCgERkQhTCIiIRJhCQEQkwv4fjzAQTgSWBPoAAAAASUVORK5CYII=\n",
      "text/plain": [
       "<Figure size 432x288 with 1 Axes>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    }
   ],
   "source": [
    "print(df.survey_type.unique())\n",
    "print(df.survey_type.value_counts())\n",
    "sns.countplot(y='survey_type', hue='happiness', data=df)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 67,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "<matplotlib.axes._subplots.AxesSubplot at 0x21421630198>"
      ]
     },
     "execution_count": 67,
     "metadata": {},
     "output_type": "execute_result"
    },
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAYgAAAEKCAYAAAAIO8L1AAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAADl0RVh0U29mdHdhcmUAbWF0cGxvdGxpYiB2ZXJzaW9uIDIuMi4yLCBodHRwOi8vbWF0cGxvdGxpYi5vcmcvhp/UCwAAGa1JREFUeJzt3X3YXHV54PHvLREVFAiSxJgEo22ksK4iZrnwtQpeRdASQKKwvkTFplVUsGsrrruCa7ur1RalWmwW1IBWwCAlIgrZKFrXAiYSwktQooskEpOovKhciuC9f5zfY4aH38ycJ3Ce5yH5fq5rrjnnN/ecueecmXPP77xNZCaSJI32qIlOQJI0OVkgJElVFghJUpUFQpJUZYGQJFVZICRJVRYISVKVBUKSVGWBkCRVTZnoBB6KffbZJ+fOnTvRaUjSI8rq1at/mpnThsU9ogvE3LlzWbVq1USnIUmPKBHxozZxbmKSJFVZICRJVRYISVKVBUKSVGWBkCRVdVogImKviFgWETdHxLqIeG5E7B0RKyLilnI/tcRGRJwZEesjYm1EHNRlbpKkwbruQXwM+Gpm/hHwLGAdcCqwMj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PP0C247G6hf/jrKs7qMpXmePZZ3qmdSSpKqdehOTJKk/C4QkqcoCIUmqskBIkqosEJKkKguE1KFyCZQDJjoPaXt4mKvUUkTskpn3T3Qe0nixByHRXEAtIm6OiKXlwnvLylnkt0bE+yLiW8DCiDgwIq4qMRdHxNSI2D8irhk1rbVl+MqImF+Gf1kuQnddmcaM0j6jTOu6cnteaX9tRFwTEWsi4p8jYpcJmDXaiVkgpG32A5Zk5jNp/lDpraX915n5gsw8HzgXeHeJuR44LZsLFe4aEU8r8a+muW7/aLvTXBL9WTSXeP6z0n4m8I3SfhBwY0TsX6bz/GwuwHY/zZVNpXFjgZC22ZCZ/7cMf5bm8gjQ/HMXEbEnzZ8yfaO0L6X5Tw5oCsKryvCrR54zyr3ApWV4Nc2F86C5Zs9Z8Psrct5Fc+2r5wDfKZdwPozmMgvSuJky0QlIk8joHXIj479q8dwLgC9ExBdp/qildpG83+a2nX73M/j7F8DSzBz2fw5SZ+xBSNvsGxHPLcMnAN/qfbD8sr8jIl5Yml5H8895ZOYPaFb6/51672GQlTT/IzDypy97lLbjeq72uXdEPGXsb0nafhYIaZt1wKKyg3lvymafURbR/GPYWpqr6f6PnscuAF5Lff/DICcDL4mI62k2Pf2HzLyJ5vLPV5TXWkHzfxnSuPEwV4nf/w3kpZn50P+FS9pB2IOQJFXZg5AkVdmDkCRVWSAkSVUWCElSlQVCklRlgZAkVVkgJElV/x+21XoXj/LX4gAAAABJRU5ErkJggg==\n",
      "text/plain": [
       "<Figure size 432x288 with 1 Axes>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    }
   ],
   "source": [
    "sns.countplot(x='province', data=df)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 86,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "<seaborn.axisgrid.FacetGrid at 0x21423845cf8>"
      ]
     },
     "execution_count": 86,
     "metadata": {},
     "output_type": "execute_result"
    },
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEU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cAJkyYcGzXrl3RjdWm5jbanYjClKrK5MmTjxYWFuYXFhbm79u3b8fvfve7YpHaJyqPjIxUr9cLAPD5fKipqQn6jOYMSCJqErKzs8vefffdK10uVyQAlJSURAwaNOj0Z599Fut2uyOqqqpk1apV5845pqenV2/dujUGAJYvX97e4/EEPSB5iE1ETcLAgQMrH330UdfNN9/czefzISoqShcsWHDgoYceKh48eHBPp9NZ069fv9Ner1cA4N577y0dM2ZM1759+/a88cYby6644gpfsNskqk1n4HtmZqbm5uaGuhlELc60adPgcrmQmpqKZcuWWSojLy9vf//+/Zv1vAt5eXmJ/fv3zzj7mofYREQGGJBERAYYkEREBhiQREQGGJBERAYYkEREBjgOkohsUfrS3wYGszzn/7lja33ef/To0YjJkyd3drlcrbxer9x7773uWbNmHa1PGexBElFYeuaZZ5zdu3c/U1RUlP/RRx8VzZ07t1NlZWW97rZhQBJRWBIRlJeXR/h8PpSVlTni4uI8UVFR9bozhofYRBSWZs+efTg7O7trUlJSv1OnTkW8+uqreyMiIupVBnuQRBSW3n777bg+ffqcKSkp+fqLL77I/9WvfpV27NixemUee5BELVjJgk0AAO+JM+eWZ9cl3TciNI1qgD/+8Y/OpUuXOgEgLi7OM2/evGKHw4E+ffpUderUqSovLy/6pptuMj3hLnuQRBQ2HnnkkdKz80l27dq18oMPPmgHAAcPHozcu3dvdI8eParrUx57kERki/oOywm23//+999NnTo1o1u3br1UVR5//PFDKSkpnvqUwYAkorCUkZFR88knn+xuSBk8xCYiMsCAJCIywENsohZk9uzZcLvdSE5OxtNPPx3q5jR5DEiiFsTtdsPlcoW6Gc1Giw1I7knDGz9fCoYWG5Dck4Y3fr4UDC02IInIXsUvPBjU6c46zHyuznGVkydPztiwYUNcQkKCZ/fu3TsbWievYtMFZs+ejWnTpmH27NmhbgpRvd11111HVq9e3aCxj+djD5IuwENTe/HcqL1GjRpVUVRU1CpY5TEgiRoRd0DNCwMyDLBX0jJd7nO/+O/cz+4BAHiP15xbup/dAwlaXys8MSDDAHsl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MCCJiAxwmA8R2eI/iw8Hdbqza+++ytJ0Z/fcc0/HDz74IC4qKkrT09OrVqxYsS8xMdFrpk72IIkobNQ23dnIkSPLdu3atXPXrl35Xbt2rZwzZ06y2fIYkEQUNkaNGlXhdDo956+bMGFCWVRUFABgyJAhp1wuV6taN64FA5KIWowlS5YkZmdnnzT7fgYkEbUIDz30UHJERIT+4he/OGZ2G16kIaKwt3DhwoT333+//ccff7zL4TDfL2RAElFYW7lyZbvnn38++eOPPy6KjY311WdbBiQR2cLMsJxgq226s/nz5ydXV1c7srKyugHAgAEDKv7+978fMFMeA5KIwkZt05098MADR6yWx4s0REQGGJBERAYYkEREBhiQREQGGJBERAYYkEREBjjMh4hs4X52T1CnO0v+dVdL053NmjWrw3vvvdfe4XAgISGhZvny5fsyMjJqzNTJHiQRhY3apjt77LHH3Lt27covLCzMHzVq1Mnf/va3KWbLY0ASUdiobbqz+Pj4c7cXnjp1yiEipsvjITYRhb1777039Y033kiIjY31bt68ucjsduxBElHYW7hwocvtdn89adKko88888xVZrdjQBJRizF9+vRj77777pVm329rQIpItogUicgeEXnYzrqIiGqzffv21md/fuONN9p36dLljNltbTsHKSIRAF4A8L8ADgH4UkRWq2q+XXUSUdNhZlhOsNU23dm6devi9u7dGy0i2rFjx+pXXnllv9ny7LxIcz2APaq6FwBE5B8AxgFgQBKRLYI93ZmdAZkK4OB5rw8BGHTxm0RkBoAZgZcVImL6ClPT9b7ZNyYCsPzhGVkY7AKNzGqsipoafr612bBhQ2/Y8PuGkp0BWdtgI71kheoiAItsbEeTJSK5qpoZ6naQPVra55uXl7cv1G0INjsv0hwC0Om81x0BFNtYHxFRUNkZkF8CuFpEOotIKwC3AVhtY31EREFl2yG2qnpE5Jfwn7CJAPCqqu60q75mqkWeWmhB+Pk2c7beaqiq/wLwLzvraM4C518pTPHzbf54LzYR2aJkwaagTneWdN8IS9OdnTV37tykJ554omNxcXFeSkqKx6iM8/FWQyIKG7VNdwYAe/bsifrwww/bpaSkVNenPAZk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psQ1QMDkuqkql/Cfx4xD8BbAHIBnIT/os3PRCQPwE4A4+ooahWA3QC2A3gJwOaMv0I7AAAAXklEQVRA+dUAJgH4U6Csr+A/fCcKKd5JQ6aISFtVrRCRGPh7gjNUdVuo20VkJ56DJLMWBZ7OFw1gKcORWgL2IImIDPAcJBGRAQYkEZEBBiQRkQEGJBGRAQYkEZGB/w9OK6JCS40M+wAAAABJRU5ErkJggg==\n",
      "text/plain": [
       "<Figure size 336.75x288 with 1 Axes>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    }
   ],
   "source": []
  },
  {
   "cell_type": "code",
   "execution_count": 74,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Help on method pivot_table in module pandas.core.frame:\n",
      "\n",
      "pivot_table(values=None, index=None, columns=None, aggfunc='mean', fill_value=None, margins=False, dropna=True, margins_name='All') method of pandas.core.frame.DataFrame instance\n",
      "    Create a spreadsheet-style pivot table as a DataFrame. The levels in\n",
      "    the pivot table will be stored in MultiIndex objects (hierarchical\n",
      "    indexes) on the index and columns of the result DataFrame\n",
      "    \n",
      "    Parameters\n",
      "    ----------\n",
      "    values : column to aggregate, optional\n",
      "    index : column, Grouper, array, or list of the previous\n",
      "        If an array is passed, it must be the same length as the data. The\n",
      "        list can contain any of the other types (except list).\n",
      "        Keys to group by on the pivot table index.  If an array is passed,\n",
      "        it is being used as the same manner as column values.\n",
      "    columns : column, Grouper, array, or list of the previous\n",
      "        If an array is passed, it must be the same length as the data. The\n",
      "        list can contain any of the other types (except list).\n",
      "        Keys to group by on the pivot table column.  If an array is passed,\n",
      "        it is being used as the same manner as column values.\n",
      "    aggfunc : function, list of functions, dict, default numpy.mean\n",
      "        If list of functions passed, the resulting pivot table will have\n",
      "        hierarchical columns whose top level are the function names\n",
      "        (inferred from the function objects themselves)\n",
      "        If dict is passed, the key is column to aggregate and value\n",
      "        is function or list of functions\n",
      "    fill_value : scalar, default None\n",
      "        Value to replace missing values with\n",
      "    margins : boolean, default False\n",
      "        Add all row / columns (e.g. for subtotal / grand totals)\n",
      "    dropna : boolean, default True\n",
      "        Do not include columns whose entries are all NaN\n",
      "    margins_name : string, default 'All'\n",
      "        Name of the row / column that will contain the totals\n",
      "        when margins is True.\n",
      "    \n",
      "    Examples\n",
      "    --------\n",
      "    >>> df = pd.DataFrame({\"A\": [\"foo\", \"foo\", \"foo\", \"foo\", \"foo\",\n",
      "    ...                          \"bar\", \"bar\", \"bar\", \"bar\"],\n",
      "    ...                    \"B\": [\"one\", \"one\", \"one\", \"two\", \"two\",\n",
      "    ...                          \"one\", \"one\", \"two\", \"two\"],\n",
      "    ...                    \"C\": [\"small\", \"large\", \"large\", \"small\",\n",
      "    ...                          \"small\", \"large\", \"small\", \"small\",\n",
      "    ...                          \"large\"],\n",
      "    ...                    \"D\": [1, 2, 2, 3, 3, 4, 5, 6, 7]})\n",
      "    >>> df\n",
      "         A    B      C  D\n",
      "    0  foo  one  small  1\n",
      "    1  foo  one  large  2\n",
      "    2  foo  one  large  2\n",
      "    3  foo  two  small  3\n",
      "    4  foo  two  small  3\n",
      "    5  bar  one  large  4\n",
      "    6  bar  one  small  5\n",
      "    7  bar  two  small  6\n",
      "    8  bar  two  large  7\n",
      "    \n",
      "    >>> table = pivot_table(df, values='D', index=['A', 'B'],\n",
      "    ...                     columns=['C'], aggfunc=np.sum)\n",
      "    >>> table\n",
      "    C        large  small\n",
      "    A   B\n",
      "    bar one    4.0    5.0\n",
      "        two    7.0    6.0\n",
      "    foo one    4.0    1.0\n",
      "        two    NaN    6.0\n",
      "    \n",
      "    >>> table = pivot_table(df, values='D', index=['A', 'B'],\n",
      "    ...                     columns=['C'], aggfunc=np.sum)\n",
      "    >>> table\n",
      "    C        large  small\n",
      "    A   B\n",
      "    bar one    4.0    5.0\n",
      "        two    7.0    6.0\n",
      "    foo one    4.0    1.0\n",
      "        two    NaN    6.0\n",
      "    \n",
      "    >>> table = pivot_table(df, values=['D', 'E'], index=['A', 'C'],\n",
      "    ...                     aggfunc={'D': np.mean,\n",
      "    ...                              'E': [min, max, np.mean]})\n",
      "    >>> table\n",
      "                      D   E\n",
      "                   mean max median min\n",
      "    A   C\n",
      "    bar large  5.500000  16   14.5  13\n",
      "        small  5.500000  15   14.5  14\n",
      "    foo large  2.000000  10    9.5   9\n",
      "        small  2.333333  12   11.0   8\n",
      "    \n",
      "    Returns\n",
      "    -------\n",
      "    table : DataFrame\n",
      "    \n",
      "    See also\n",
      "    --------\n",
      "    DataFrame.pivot : pivot without aggregation that can handle\n",
      "        non-numeric data\n",
      "\n"
     ]
    }
   ],
   "source": [
    "help(df.pivot_table)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 69,
   "metadata": {},
   "outputs": [],
   "source": [
    "# plt.figure(figsize=(40, 40))\n",
    "# g = sns.heatmap(df.corr(), annot=True, fmt='.2f')"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 70,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "<seaborn.axisgrid.FacetGrid at 0x214215a4f60>"
      ]
     },
     "execution_count": 70,
     "metadata": {},
     "output_type": "execute_result"
    },
    {
     "data": {
      "text/plain": [
       "<Figure size 1440x1440 with 0 Axes>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAARgAAAEYCAYAAACHjumMAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAADl0RVh0U29mdHdhcmUAbWF0cGxvdGxpYiB2ZXJzaW9uIDIuMi4yLCBodHRwOi8vbWF0cGxvdGxpYi5vcmcvhp/UCwAAE0JJREFUeJzt3X2QXXV9x/H3hzwYEhJ5yAJCQBQVpdQBmqEiDIJoiTwEAziVAatRJp0ODlCrKIKOTm2npQ61VMeagkIRaSmQoqg8lBoorYoBAiQEFBGEPJClFMKiPCR8+8c5S3ezu9lz7t3vfdrPa+bOuffc+zu/b3bPfnLO7zxcRQRmZhm2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AoQlgajwnvl0AAAAASUVORK5CYII=\n",
      "text/plain": [
       "<Figure size 288x288 with 1 Axes>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    }
   ],
   "source": [
    "plt.figure(figsize=(20,20))\n",
    "sns.factorplot(x='edu', y='happiness', data=df, kind='bar')"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": []
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.6.5"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 2
}
